package com.jumi.microservice.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jm.member.common.core.web.page.TableDataInfo;
import com.jumi.microservice.entity.JmAdminChangeUserLog;
import com.jumi.microservice.enums.CommonEnum;
import com.jumi.microservice.service.IJmAdminChangeUserLogService;
import com.jumi.microservice.service.PageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户信息更改日志表 前端控制器
 * </p>
 *
 * @author 要挑客户管理团队
 * @since 2020-07-14
 */
@RestController
@RequestMapping("/jm-admin-change-user-log")
@Api(value = "用户信息修改日志",tags = "用户信息修改日志")
public class JmAdminChangeUserLogController {

    @Autowired
    IJmAdminChangeUserLogService changeUserLogService;


    @PostMapping("/getPage")
    @ApiOperation("获取用户信息更改日志分页")
    public TableDataInfo<JmAdminChangeUserLog> getPage(Integer uid, Integer current,Integer size){
        Page page=new Page(current,size);
        QueryWrapper wrapper= new QueryWrapper();
        wrapper.eq("uid",uid);wrapper.eq("is_del", CommonEnum.否);
        page= (Page) changeUserLogService.page(page,wrapper);
        return PageService.getDataTableInfo(page);
    }
}
